package com.IO流.处理流.Input_Output_StreamReader_Writer__转换流;

import java.io.*;

public class InputStreamReader__ {
    public static void main(String[] args) throws IOException {
        String filename = "D:/JAVA_test/transformation.txt";
        ///创建字节节点流，提供路径
        FileInputStream file = new FileInputStream(filename);
        ///将字节节点流 用转换流 转换成 字符节点流 ，并设置编码格式GBK，将节点流以GBK的格式转换成字符流，防止乱码；
        InputStreamReader isr = new InputStreamReader(file, "gbk");
        ///将字符节点流  包转成  缓冲处理流
        BufferedReader bw = new BufferedReader(isr);
        System.out.println(bw.readLine());
        bw.close();
        System.out.println("ok~~");
    }
}
